<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HelloWorld</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>v-if&v-else&v-show</h1>
    <hr>
    <div id="app">
        <div v-if="isLogin">你好，chen！</div>
        <!-- 判断是否加载 -->
        <div v-else>请登录！</div>
        <div v-show="isLogin">你好，chen！</div>
        <!-- 调整dispaly属性，true-block,false-none -->
        
    </div>
    <script type="text/javascript">
        var app=new Vue({
            el:'#app',
            data:{
               isLogin:true,
            //    isLogin:false,
            }
        }) 
    </script>
</body>
</html>